package com.woniuxy.shop.Mapper;

import com.hc.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName goodsMapper
 * @Description
 * @Author TJ
 * @Date 2022/10/20 10:17
 * @Version 1.0
 **/
@Mapper
public interface GoodsMapper {
    //根据商品id查询商品信息,返回店铺集合
    @Select("select * from hc_goods where id=#{id}")
    Goods getByGoodsId(int id);

    @Select("select * from hc_goods where shop_id=#{id}")
    List<Goods> getByShopId(int id);
}
